package com.relife.core.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "sys_leader")
public class LeaderEntity extends BaseEntity {

	private static final long serialVersionUID = 934928019282120037L;

	/** 职位 **/
	private String dutyCode;
	private UserEntity user;
	private DepartmentEntity depart;

	@Column(name = "DUTY_CODE")
	public String getDutyCode() {
		return dutyCode;
	}

	public void setDutyCode(String dutyCode) {
		this.dutyCode = dutyCode;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "USER_ID")
	public UserEntity getUser() {
		return user;
	}

	public void setUser(UserEntity user) {
		this.user = user;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "DEPART_ID")
	public DepartmentEntity getDepart() {
		return depart;
	}

	public void setDepart(DepartmentEntity depart) {
		this.depart = depart;
	}

}
